package com.qcby.entity;

import com.google.gson.annotations.Expose;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@ApiModel
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @Expose
    @ApiModelProperty(value = "用户id",example = "1")
    private Integer id;
    @Expose
    @ApiModelProperty(value = "用户名",example = "admin")
    private String username;
    @Expose
    @ApiModelProperty(value = "用户密码",example = "123456")
    private String password;
    @Expose
    @ApiModelProperty(value = "用户手机号",example = "12345678901")
    private String phone;
    @Expose
    @ApiModelProperty(value = "用户地址",example = "中国")
    private String address;
    @Expose
    @ApiModelProperty(value = "用户添加时间",example = "2020-01-01 00:00:00")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime addTime;
    @Expose
    @ApiModelProperty(value = "用户头像",example = "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png")
    private String icon;
    @Expose
    @ApiModelProperty(value = "用户页码",example = "1")
    private Integer page;
    @Expose
    @ApiModelProperty(value = "用户页数",example = "1")
    private Integer pageSize;
    @Expose
    private Integer orderCount;
    @Expose
    private String token;
    @Expose
    private Integer role;
}
